home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 2,801 to 2,900 / aol-file-protocol-4400-2801-to-2900.zip / AOLDLs / C++ Files Library / C++ Direct Buffer Access Code / info.txt < prev   
Text File  |  2014-09-28  |  3KB  |  43 lines

  1. Subject:  C++ Direct Buffer Access Code
  2. Author:  Macneil Shonle
  3. Uploaded By:  MacneilS
  4. Date:  11/19/1995
  5.  
  6. File:  Blitting.sit (120742 bytes) 
  7. Estimated Download Time (60658 baud):  < 1 minute
  8. Download Count:  273
  9.  
  10. Needs:  C++ compiler
  11.  
  12. Keywords:  GRAPHICS SPRITE BLIT COPYBITS QUICKDRAW GWORLD
  13.  
  14.  
  15. LIBRARY:   MDV/Developer Source Code/C++
  16. KEYWORDS:  GRAPHICS SPRITE BLIT COPYBITS QUICKDRAW GWORLD
  17.  
  18. NOTE: If you have downloaded previous versions of these classes, please download this new improved version.
  19.  
  20. The following component explained here is the evolution of some direct blitting classes I had made for my own personal use. As I used the classes more and more I was able to see what was needed in the classes, and what wasn't. The result was a much simpler and cleaner design that can be useful to anyone interested in speeding up their graphics routines.
  21.  
  22. If you want to directly access a GWorld, all you have to do is supply a pointer to it in the constructor for a "GWorldAccessor" object. Take a look at the following code, it will directly access the GWorld's pixel-map to draw a black dot at coordinate (12, 16):
  23.  
  24.     GWorldAccessor gworldBuff(myGWorld);
  25.     gworldBuff.setPixel(12, 16, 0xFF);
  26.  
  27. Previously, the same class that provided access to the pixel-map also created it. This looked simpler on the outside, but was too limiting to users of other frameworks and put too much complexity into one class. 
  28.  
  29. These classes have been made to aid blitting code for those who do not want to change their project to a whole new library when all they want to do is get something as simple as the base address of a GWorld. These are the people I had in mind while writing this code. If you have a GWorld already made with PowerPlant, you can still benefit with direct access, and with my classes.
  30.  
  31. Feel free to upload this code anywhere, but only the original archive. You may change the code for your own uses (such as making functions inline) but you are not given permission to distribute it in the changed form. Use the Blitting Class Library, or parts of it, at your own risk. If the libarary is used in a project, you are not obligated to give creditx but it would be nice if you were to. The code is free, enjoy!
  32.  
  33. Check out the "BCL Manual," which futher explains the library.
  34.  
  35. Take care,
  36. Macneil Shonle
  37.  
  38. ------------------------------------------------------------
  39. Macintosh Developers Forum Libraries         Go Keyword: MDV
  40.  
  41. This file has been checked for viruses with Disinfectant 3.6
  42.  
  43.